<?php

class UserRestResource extends RestResource {

    private static $instance;

    protected function __construct() {
        parent::__construct('User', '/users');
    }

    /**
     * @return UserRestResource
     */
    public static function singleton() {
        if (!isset(self::$instance)) {
            self::$instance = new UserRestResource();
        }
        return self::$instance;
    }

    public function updatePassword($userId, $passwords) {
        $b = YougoRestClient::singleton()->put($this->resourcePath . '/' . $userId . '/password', $this->objectToFormUrlEncoded($passwords), array('Content-Type' => 'application/x-www-form-urlencoded'));
    }

}